package net.qhzw.vip.qiyu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.qhzw.vip.qiyu.entity.OrderSettlement;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderSettlementMapper extends BaseMapper<OrderSettlement> {

    void updateByOrderNumberAndUserId(@Param("orderSettlement") OrderSettlement orderSettlement);

    List<OrderSettlement> getSettlementsByPayNo(@Param("payNo") String payNo);

    void updateSettlementsByPayNo(@Param("outTradeNo") String outTradeNo,
                                  @Param("transactionId") String transactionId);

    int updateToPay(@Param("payNo") String payNo,
                    @Param("version") Integer version);

    /***
     * 根据订单号获取支付订单号
     * @param orderNumbers
     * @return
     */
    String getSettlementsPayNoByOrderNumber(String orderNumbers);



}